#ifndef COMPILE
#include "./head.cpp"
#endif

bool test1()
{
    std::vector<int> v{3, 3, 5, 0, 0, 3, 1, 4};
    auto ans = Solution().maxProfit(v);

    return ans == 6;
}

bool test2()
{
    std::vector<int> v{1, 2, 3, 4, 5};
    auto ans = Solution().maxProfit(v);

    return ans == 4;
}

bool test3()
{
    std::vector<int> v{7, 6, 4, 3, 1};
    auto ans = Solution().maxProfit(v);

    return ans == 0;
}

bool test4()
{
    std::vector<int> v{1};
    auto ans = Solution().maxProfit(v);

    return ans == 0;
}

int main()
{
    if (test1())
        std::cout << "示例一通过..." << std::endl;
    if (test2())
        std::cout << "示例二通过..." << std::endl;
    if (test3())
        std::cout << "示例三通过..." << std::endl;
    if (test4())
        std::cout << "示例四通过..." << std::endl;
    return 0;
}